﻿<!DOCTYPE HTML PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html>
<head lang="en">
    <title>窗口操作</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
    <meta name="format-detection" content="telephone=no">
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <!-- No Baidu Siteapp-->
    <!--<meta http-equiv="Cache-Control" content="no-siteapp" />-->
    <META HTTP-EQUIV="pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <META HTTP-EQUIV="expires" CONTENT="0">
    <link rel="alternate icon" type="image/png" href="favicon.png">
    <link rel="stylesheet" href="/scripts/amazeui/amazeui.min.css" />
    <link rel="stylesheet" href="../css/main.css" />
    <script src="/scripts/jquery-3.3.1.min.js"></script>
    <script src="/scripts/amazeui/amazeui.min.js"></script>
    <!-- 双向通讯 websockets-->
    <script src="/scripts/jquery.signalR-2.4.1.min.js"></script>
    <style>
        body {
            padding: 25px;
            margin: auto;
        }

        .fun_bd {
            position: relative;
            background: aliceblue;
        }

        .record {
            font-size: 16px;
        }

        label {
            width: 100px;
        }

        #txtReceive, #txtSend {
            width: 99%
        }

        .left-panel {
            width: 40%;
            float: left;
        }

        .right-panel {
            width: 50%;
            float: left;
        }
        .disabled{
            color:gray;
        }
    </style>
    <script type="text/javascript">

        $(function () {
        })
        $(document).bind('dds.window.init', function (e, win) {
            console.log('dds.window.init')
        });
        function getEID() {
            $('#txtEID').val(dds.window.getEID())
        }
        function setTitle() {
            dds.window.setTitle($('#txtTitle').val())
        }
        function setIcon() {
            dds.window.setIcon($('#txtIcon').val())
        }
        function setZoomLevel() {
            dds.window.setZoomLevel(parseFloat($('#txtZoomLevel').val()))
        }
        function getZoomLevel() {
            $('#txtZoomLevel').val(dds.window.getZoomLevel())
        }
        function setWidth() {
            dds.window.setWidth(parseFloat($('#txtWidth').val()))
        }

        function setHeight() {
            dds.window.setHeight(parseFloat($('#txtHeight').val()))
        }
    </script>

</head>

<body>
    <div class="fun_bd" style="padding-top:0px;">
        <div class="package-control">
            <div class="left-panel">
                <div class="display">
                    <div>
                       <h1>界面</h1>
                    </div>
                    <div class="record" style="margin-top:0px;">
                        <div>
                            <label>全屏</label>
                            <input type="button" value="全屏" onclick="dds.window.fullScreen()" />
                        </div>
                        <div>
                            <label>退出全屏</label>
                            <input type="button" value="退出全屏" onclick="dds.window.exitFullScreen()" />
                        </div>
                        <div>
                            <label>全屏切换</label>
                            <input type="button" value="切换" onclick="dds.window.maxMin()" />
                        </div>
                        <div>
                            <label>最大化</label>
                            <input type="button" value="最大化" onclick="dds.window.max()" />
                        </div>
                        <div>
                            <label>最小化</label>
                            <input type="button" value="最小化" onclick="dds.window.min()" />
                        </div>
                        <div>
                            <label>宽度</label><input id="txtWidth" type="text" value="1000" />
                            <input type="button" value="设置" onclick="setWidth()" />
                        </div>
                        <div>
                            <label>高度</label><input id="txtHeight" type="text" value="500" />
                            <input type="button" value="设置" onclick="setHeight()" />
                        </div>
                        <div>
                            <label>始终在最前面</label>
                            <input type="button" value="操作" onclick="dds.window.setTopmost(true)" />
                        </div>
                        <div>
                            <label>退出在最前面</label>
                            <input type="button" value="操作" onclick="dds.window.setTopmost(false)" />
                        </div>
                        <div>
                            <label>缩放</label><input id="txtZoomLevel" type="text" value="1.2" />
                            <input type="button" value="设置" onclick="setZoomLevel()" />
                            <input type="button" value="获取" onclick="getZoomLevel()" />
                        </div>
                    </div>
                </div>
                <div class="submit">
                </div>
            </div>
            <div class="right-panel">
                <div>
                    <h1>应用</h1>
                </div>
                <div>
                    <label>EID</label><input id="txtEID" type="text" value="xxx" />
                    <input type="button" value="获取设备唯一Id" onclick="getEID()" />
                </div>
                <div>
                    <label>标题</label><input id="txtTitle" type="text" value="我是标题" />
                    <input type="button" value="设置" onclick="setTitle()" />
                </div>
                <div>
                    <label>图标</label><input id="txtIcon" type="text" value="https://www.baidu.com/favicon.ico" />
                    <input type="button" value="设置" onclick="setIcon()" />
                </div>
                <div>
                    <label>刷新</label>
                    <input type="button" value="刷新" onclick="dds.window.refresh()" />
                </div>
                <div>
                    <label>关闭</label>
                    <input type="button" value="关闭" onclick="dds.window.exit()" />
                </div>
                <div>
                    <label>关机</label>
                    <input type="button" value="关机" onclick="dds.window.shutdown()" />
                    谨慎
                </div>
                <div>
                    <h1>快捷键</h1>
                </div>
                <div>
                    <label>F1</label>
                    <input type="button" value="回到首页" class="disabled" onclick="" />
                    <!--<input type="button" value="浏览模式" class="disabled" onclick="" />-->
                </div>
                <!--<div>
                    <label>F2</label>
                    <input type="button" value="参数模式" class="disabled" onclick="" />
                </div>-->
                <div>
                    <label>F3</label>
                    <input type="button" value="关机" class="disabled" onclick="" />
                </div>
                <div>
                    <label>F4</label>
                    <input type="button" value="关闭" class="disabled" onclick="" />
                </div>
                <div>
                    <label>F5</label>
                    <input type="button" value="刷新" class="disabled" onclick="" />
                </div>
                <!--<div>
                    <label>F6</label>
                    <input type="button" value="回到首页" class="disabled" onclick="" />
                </div>-->
                <div>
                    <label>F11</label>
                    <input type="button" value="全屏" class="disabled" onclick="" />
                </div>
                <div>
                    <label>F12</label>
                    <input type="button" value="开发者工具" class="disabled" onclick="" />
                </div>
                <div class="tip-green">
                    管理密码：123
                </div>
            </div>
        </div>
    </div>

</body>

</html>